package com.community.body.domain;

import java.math.BigDecimal;
import java.util.List;

import com.community.common.annotation.Excel;
import com.community.common.core.domain.BaseEntity;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotNull;

/**
 * 单元 对象 zy_unit
 * 
 * @author community
 * @date 2024-04-09
 */
public class ZyUnit extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 单元id */
//    @Excel(name = "单元id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long unitId;

    /** 小区id */
//    @Excel(name = "小区id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long communityId;

    /** 楼栋id */
//    @Excel(name = "楼栋id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long buildingId;

    /** 单元名称 */
    @Excel(name = "单元名称",sort = 3)
    private String unitName;

    /** 单元编号 */
//    @Excel(name = "单元编号")
    private String unitCode;

    /** 层数 */
    @Excel(name = "层数",sort = 5)
    private Long unitLevel;

    /** 建筑面积 */
    @Excel(name = "建筑面积",sort = 6)
    private BigDecimal unitAcreage;

    /** 是否有电梯 */
    @Excel(name = "是否有电梯",sort = 7)
    private String unitHaveElevator;

    private List<ZyRoom> roomList;

    @Excel(name = "小区名称",sort = 1)
    @NotNull(message = "小区名称不能为空")
    private String communityName;

    @Excel(name = "楼栋",sort = 2)
    @NotNull(message = "楼栋名称不能为空")
    private String buildingName;

    private List<ZyRoom> children;

    public String getCommunityName() {
        return communityName;
    }

    public void setCommunityName(String communityName) {
        this.communityName = communityName;
    }

    public String getBuildingName() {
        return buildingName;
    }

    public void setBuildingName(String buildingName) {
        this.buildingName = buildingName;
    }

    public Long getUnitId() {
        return unitId;
    }

    public void setUnitId(Long unitId) {
        this.unitId = unitId;
    }

    public Long getCommunityId() {
        return communityId;
    }

    public void setCommunityId(Long communityId) {
        this.communityId = communityId;
    }

    public Long getBuildingId() {
        return buildingId;
    }

    public void setBuildingId(Long buildingId) {
        this.buildingId = buildingId;
    }

    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    public String getUnitCode() {
        return unitCode;
    }

    public void setUnitCode(String unitCode) {
        this.unitCode = unitCode;
    }

    public Long getUnitLevel() {
        return unitLevel;
    }

    public void setUnitLevel(Long unitLevel) {
        this.unitLevel = unitLevel;
    }

    public BigDecimal getUnitAcreage() {
        return unitAcreage;
    }

    public void setUnitAcreage(BigDecimal unitAcreage) {
        this.unitAcreage = unitAcreage;
    }

    public String getUnitHaveElevator() {
        return unitHaveElevator;
    }

    public void setUnitHaveElevator(String unitHaveElevator) {
        this.unitHaveElevator = unitHaveElevator;
    }

    public List<ZyRoom> getRoomList() {
        return roomList;
    }

    public void setRoomList(List<ZyRoom> roomList) {
        this.roomList = roomList;
    }

    @Override
    public String toString() {
        return "ZyUnit{" +
                "unitId=" + unitId +
                ", communityId=" + communityId +
                ", buildingId=" + buildingId +
                ", unitName='" + unitName + '\'' +
                ", unitCode='" + unitCode + '\'' +
                ", unitLevel=" + unitLevel +
                ", unitAcreage=" + unitAcreage +
                ", unitHaveElevator='" + unitHaveElevator + '\'' +
                ", roomList=" + roomList +
                ", communityName='" + communityName + '\'' +
                ", buildingName='" + buildingName + '\'' +
                '}';
    }
}
